<include file="header" />
<body>
<div class="wraper margin-none">
    <div class="top">
        <a href="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
	    <span class="pull-left">删除<if condition="$ecs_id eq 9">商户<else/>寝室</if></span>
        <a href="javascript:;" class="pull-right text-right"></a>
    </div>
    <div class="container">
	    <volist name="data" id="vo">
            <a href="javascript:void(0);"  class="lists del">{BEESCRM:$vo.community_name} {BEESCRM:$vo.building_name} {BEESCRM:$vo.floor_name} {BEESCRM:$vo.room_name}
	            <span class="iconfont icon-shanchu pull-right" data-floow="{BEESCRM:$vo.floow_id}"></span>
            </a>
	    </volist>
    </div>
	<input type="hidden" id="ecs_id" value="{BEESCRM:$ecs_id}">
</div>
<include file="commonJs"/>
<script>
	alert(111)
	$(function(){
		$(document).ready(function(){
			$(document).bind('click','.del',function(){
				alert(1111);
				var floowId = $(this).data('floow');
				var ecs_id = $('#ecs_id').val();
				$.confirm('温馨提示：删除后将不可恢复', drop);
				function drop(){
					$.ajax({
						'url': "/base/ecs/delEleRemind",
						'data': {floow_id:floowId,ecs_id:ecs_id},
						'dataType':'json',
						'type': 'GET',
						'async': true,
						success: function(data){
							if(data.status == 'S'){
								$.alert('success','删除成功');
							}else{
								$.alert('error','删除失败');
							}
							reload();
	$(document).ready(function(){
		alert(111)
		$(document).on('click','.del',function(){
			alert(1111);
			var floowId = $(this).data('floow');
			var ecs_id = $('#ecs_id').val();
			$.confirm('温馨提示：删除后将不可恢复', drop);
			function drop(){
				$.ajax({
					'url': "/base/ecs/delEleRemind",
					'data': {floow_id:floowId,ecs_id:ecs_id},
					'dataType':'json',
					'type': 'GET',
					'async': true,
					success: function(data){
						if(data.status == 'S'){
							$.alert('success','删除成功');
						}else{
							$.alert('error','删除失败');
						}
						reload();
					}
				});
			}


		})
	})

	//页面刷新
	function reload(){
		setTimeout('location.reload()',2000);
	}
</script>
</body>
</html>